<template>
  <view class="">
    <button bindtab="gotoBack">后退</button>
    <navigator url="/page/message/message?name=zs&age=20" open-type="switchTab">导航到消息页面</navigator>

    <wxs module="m1">
      module.exports.toUpper = function(str){
      return str.toUpperCase()
      }
    </wxs>
  </view>

</template>

<script>
  // 导入自己封装的 mixin 模块
  import badgeMix from '@/mixins/tabber-badge.js'
  export default {
    mixins: [badgeMix],
    data() {
      return {};
    },
    onLoad(options) {
      // options 就是导航传递过来的参数对象
      console.log(options)
    },
    onPullDownRefresh() {
      // 想在刷新后做的某些事情
    },
    onReachBottom() {
      // 上拉触底时想做的某些动作
    },
    methods: {
      gotoBack() {
        wx.navigateBack()
      },
    },
  }
</script>

<style lang="scss">

</style>